<script type="text/javascript">
    function authenticatePlasa(){
        //alert("tes");
        $.post(base_url+"site/ajax_plasa_login",
        {
            userplasa : $("#userplasa").val(),
            password : $("#password").val()
        },
        function(str){
            //alert(str);
            if(str=="succ"){
                //alert("masuk sini");
                window.location.replace(base_url+"site");
            }else{
                alert("Login Plasa incorrect");
            }
        }
    );
    }
    
    function logoutPlasa(){
        window.location.replace(base_url+"site/logout_plasa");
    }

</script>
<div class="post">
    <div class ="box_container">
        <h2 class="title">Kuesioner Pelayanan Plasa Telkom</h2><br/>
        <?php if ($is_plasa) { ?>
            <span class="usualText">Logout Plasa</span>
            <div class="box_login_plasa">
                <div class="submit center">
                    <input class="button" type="submit" value="Logout" onclick="logoutPlasa()" />
                </div>
            </div>
        <?php } else { ?>
            <span class="usualText">Login Plasa</span>
            <div class="box_login_plasa">
                <form class="form_login_plasa" method="post" action="javascript:" onsubmit="" enctype="multipart/form-data">
                    <table class ="table_login_plasa">
                        <tr><td>Userplasa</td><td>:</td><td><input class="inputText" id="userplasa" name="username" /></td></tr>
                        <tr><td>Password</td><td>:</td><td><input class="inputText" type="password" id="password" name="password" /></td></tr>
                    </table>
                    <div class="submit center">
                        <input class="button" type="submit" value="Submit" onclick="authenticatePlasa()" />
                    </div>
                </form>
            </div>
        <?php } ?>
    </div>
</div>
